<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Http\Traits\ResponseJson;


class TestController extends Controller
{
    use ResponseJson;

    public function index()
    {
        $data = ['code' => 0, 'msg' => '成功', 'user' => ['username' => 'test', 'avatar' => '']];
        return response()->json($data);
    }


    public function login()
    {
        $data = ['code' => 0, 'msg' => '成功', 'token'=>'1234'];
        return response()->json($data);
    }

}
